<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>COWS | User Profile</title>
        <link href="../css/user.css" media="screen" rel="stylesheet" type="text/css" />
        <style>
            body {
                background: #aecbdf url(../images/landing/subpage_bg.jpg) repeat-x left top
            }

            table.gray_table {
                background: #f7f7f7
            }

            table.gray_table td {
                border-top: 1px solid #fff;
                border-bottom: 1px solid #eee
            }
        </style>
        <script type="text/javascript" src="../js/jquery-1.6.1.js">
        </script>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js" type="text/javascript">
        </script>
    </head>
    <body>
        <div class="subpage_holder">
            <div class="container">
                <div class="span-5">
                    <a href="" class="logo"></a>
                </div>
                <div class="span-10">
                    <div id="top_nav">
                        <ul>
                            <li>
                                <a href="" class="active">Home</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="span-8 last margin_30">
                    <a href="../login.html" title="log in" class="log_in right"></a>
                    <a href="../registration.html" title="sign up" class="sign_up right"></a>
                </div>
                <div class="clear spacer">
                </div>
                <div class="subpage_content_outer left">
                    <div class="subpage_content_inner">
                        <div class="span-5 subpage_lcol">
                            <ul class="features_tabs">
                                <li>
                                    <a href="#tab1"><img src="../images/landing/icon_dash.png" align="absmiddle">Dashboard </a>
                                </li>
                                <li>
                                    <a href="#tab2"><img src="../images/landing/icon_rewards.png" align="absmiddle">Purchase Time</a>
                                </li>
                                <li>
                                    <a href="#tab3"><img src="../images/landing/icon_edit.png" align="absmiddle">Business Account</a>
                                </li>
                                <li>
                                    <a href="#tab4"><img src="../images/landing/icon_rewards.png" align="absmiddle">Rewards</a>
                                </li>
                                <li>
                                    <a href="#tab5"><img src="../images/landing/icon_rewards.png" align="absmiddle">History</a>
                                </li>
                                <li>
                                    <a href="#tab6"><img src="../images/landing/icon_analytics.png" align="absmiddle">Analytics</a>
                                </li>
                                <li>
                                    <a href="#tab7"><img src="../images/landing/icon_edit.png" align="absmiddle">Edit Profile</a>
                                </li>
                            </ul>
                        </div>
                        <div class="span-17 last prepend-1">
                            <div class="tab_container">
                                <div id="tab1" class="tab_content">
                                    <div class="subpage_header">
                                        <span class="blue">Welcome to the dashboard!</span>
                                    </div>
                                    <hr/>
                                    <?php
										$host="db.seng.uvic.ca"; // Host name
										$username="se321g01"; // Mysql username
										$password="un8bi2YM"; // Mysql password
										$db_name="se321g01"; // Database name
										$tbl_name="user_info"; // Table name

										// Connect to server and select databse.
										mysql_connect("$host", "$username", "$password")or die("cannot connect");
										mysql_select_db("$db_name")or die("cannot select DB");

										$uid = $_GET["uid"];
										$sql="SELECT * FROM $tbl_name WHERE uid='$uid'";
										$result=mysql_query($sql);
										$row = mysql_fetch_array($result);
									?>
                                    <div class="span-8 feature_box">
                                        <h5>Account Overview</h5>
                                        <p>
                                            Name: <?php echo $row['first_name'] . " " . $row['last_name']; ?>
                                        </p>
                                        <p>
                                            Email: <?php echo $row['email']; ?>
                                        </p>

                                    </div>
                                    <div class="span-6">
                                        <img src="../images/landing/account.jpg" width="100%" height="100" />
                                    </div><hr/>
                                    <?php
                                    	$sql="SELECT * FROM user_stats WHERE uid='$uid'";
										$result=mysql_query($sql);
										$row = mysql_fetch_array($result);
									?>
                                    <div class="span-8">
                                        <img src="../images/landing/network.gif" width="80%" height="100" />
                                    </div>
                                    <div class="span-6 feature_box">
                                        <h5>Network Information</h5>
                                        <p>
                                            Time Remaining: <?php echo $row['time_left']; ?>
                                        </p>
                                        <p>
                                            Points Available: <?php echo $row['points']; ?>
                                        </p>
                                    </div><hr>
                                    <?php
                                    	$sql="SELECT * FROM billing_info WHERE uid='$uid'";
										$result=mysql_query($sql);
										$row = mysql_fetch_array($result);
										$uid = $_GET["uid"];
									?>
                                    <div class="span-8 feature_box">
                                        <h5>Billing Information</h5>
                                        <p>
                                            Country: <?php echo $row['country']; ?><br />
                                            Province: <?php echo $row['province']; ?><br />
                                            City: <?php echo $row['city']; ?><br />
                                            Address: <?php echo $row['street_address']; ?><br />
                                            <br />
                                            Payment Method: <?php echo $row['payment_method']; ?> <br />
                                        </p>
                                    </div>
                                    <div class="span-6">
                                        <img src="../images/landing/billing.jpg" width="100%" height="100" />
                                    </div><hr/>
                                    <div class="span-8">
                                        <img src="../images/landing/logo.gif" width="80%" height="100" />
                                    </div>
                                    <div class="span-6 feature_box">
                                        <h5>How it works</h5>
                                        <p>
                                            COWS is a paid service in which customers (you), purchase hours on our public WiFi service.
                                            After purchasing the hours, you will be able to browse the internet at every one of our public
                                            WiFi hot spots throughout the city. Our network offers blazing fast download times and is
                                            always available.
                                        </p>
                                    </div>
                                    <hr/>
                                </div>
                                <div id="tab2" class="tab_content">
                                    <div class="subpage_header">
                                        <span class="blue">Purchase Time</span>
                                        pay to play son
                                    </div>
                                    <hr/>
                                    <p>
                                    	Note: Any time that is purchased below will be automatically billed to you current payment method. To update your
                                    	current payment method, you may visit the Edit Profile tab located on the left hand side.
                                    </p>
                                    <form action=<?php echo "./buytime.php?uid=$uid"; ?> method="post">
	                                    <table name="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100px" class="gray_table left">
	                                                <tr>
	                                                    <td align="right" width="150" height="60" valign="middle">
	                                                        <label>
	                                                            Time to purchase (minutes)
	                                                        </label>
	                                                    </td>
	                                                    <td width="400" valign="middle">
	                                                        <input class="text_box" type="text" name="txtTime" id="txtTime" value="0" />
	                                                    </td>
	                                                    <td align="left" valign="middle">
	                                                        <div class="td_spacer">
	                                                        </div>
	                                                    </td>
	                                                </tr>
	                                   </table>
                                   <input type="submit">
                                   </form>
                                </div>
                                
                                <div id="tab3" class="tab_content">
                                    <div class="subpage_header">
                                        <span class="blue">Business Account</span>
                                        cuz' we all professional like
                                    </div>
                                    <hr/>
                                    <p>
                                    	Note: By linking your account to a business account, any time spent browsing will be
                                    	automatically taken off the business account that is linked to your account.
                                    </p>
                                    <form action=<?php echo "./link.php?uid=$uid"; ?> method="post">
	                                    <table name="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100px" class="gray_table left">
	                                                <tr>
	                                                    <td align="right" width="150" height="60" valign="middle">
	                                                        <label>
	                                                            Business account name
	                                                        </label>
	                                                    </td>
	                                                    <td width="400" valign="middle">
	                                                        <input class="text_box" type="text" name="txtAccountName" id="txtTime" value="" />
	                                                    </td>
	                                                    <td align="left" valign="middle">
	                                                        <div class="td_spacer">
	                                                        </div>
	                                                    </td>
	                                                </tr>
	                                                <tr>
	                                                    <td align="right" width="150" height="60" valign="middle">
	                                                        <label>
	                                                            Password
	                                                        </label>
	                                                    </td>
	                                                    <td width="400" valign="middle">
	                                                        <input class="text_box" type="password" name="txtPassword" id="txtTime" value="" />
	                                                    </td>
	                                                    <td align="left" valign="middle">
	                                                        <div class="td_spacer">
	                                                        </div>
	                                                    </td>
	                                                </tr>
	                                   </table>
                                   <input type="submit" value="Link">
                                   </form>
                                   
                                   <hr/>
                                   
                                   <p>Make your personal account into a business account.</p>
                                   <form action=<?php echo "./createbusiness.php?uid=$uid"; ?> method="post">
	                                    <table name="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100px" class="gray_table left">
	                                                <tr>
	                                                    <td align="right" width="150" height="60" valign="middle">
	                                                        <label>
	                                                            Business account name
	                                                        </label>
	                                                    </td>
	                                                    <td width="400" valign="middle">
	                                                        <input class="text_box" type="text" name="txtAccountName" id="txtAccountName" value="" />
	                                                    </td>
	                                                    <td align="left" valign="middle">
	                                                        <div class="td_spacer">
	                                                        </div>
	                                                    </td>
	                                                </tr>
	                                                <tr>
	                                                    <td align="right" width="150" height="60" valign="middle">
	                                                        <label>
	                                                            Password
	                                                        </label>
	                                                    </td>
	                                                    <td width="400" valign="middle">
	                                                        <input class="text_box" type="password" name="txtPassword" id="txtPassword" value="" />
	                                                    </td>
	                                                    <td align="left" valign="middle">
	                                                        <div class="td_spacer">
	                                                        </div>
	                                                    </td>
	                                                </tr>
	                                   </table>
                                   <input type="submit" value="Create">
                                   </form>
                                </div>
                                
                                <!--REWARDS!-->
                                
                                <div id="tab4" class="tab_content">
                                    <div class="subpage_header">
                                        <span class="blue">Rewards</span>
                                        because we like you
                                    </div>
                                    <hr/>
                                    <div class="span-8 feature_box">
                                        <h5>Search</h5>
                                     </div>
                                     
                                     <?php
                                    	$sql="SELECT * FROM rewards";
										$result=mysql_query($sql);
										$uid = $_GET["uid"];
									?>
									<table name="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100px" class="gray_table left">
										<tr>
											<th align="left">Title</th>
											<th align="left">Image</th>
											<th align="left">Description</th>
											<th align="left">Points</th>
											<th align="left">Redeem</th>
										</tr>
										<?php
										while($row = mysql_fetch_array($result))
											{
												echo "<tr>";
												echo "<td>" . $row['title'] . "</td>";
												echo '<td><img src="../images/landing/rewards/'  . $row['path'] . '" align="absmiddle"></td>';
												echo "<td>" . $row['description'] . "</td>";
												echo "<td>" . $row['points'] . "</td>";
												echo '<td><form action="./buyreward.php?uid=' . $uid . '&rid=' . $row['rid'] . '"" method="post"><input type="submit" value="Redeem"></form></td>';
												echo "</tr>";
											}

										?>
									</table>
                                </div>
                                <div id="tab5" class="tab_content">
                                    <div class="subpage_header">
                                        <span class="blue">History</span>
                                        check your flow
                                    </div>
                                    <hr/>
                                    <p>
                                    	Note: This is where you can find your previous purchase history
                                    </p>
                                    <?php
                                    	$sql="SELECT * FROM user_history WHERE uid='$uid'";
										$result=mysql_query($sql);
									?>
									<table name="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100px" class="gray_table left">
										<tr>
											<th align="left">Date</th>
											<th align="left">Points / Time</th>
											<th align="left">Description</th>
											<th align="left">Print</th>
										</tr>
										<?php
										while($row = mysql_fetch_array($result))
											{
												echo "<tr>";
												echo "<td>" . $row['day_stamp'] . "</td>";
												echo "<td>" . $row['points'] . "</td>";
												echo "<td>" . $row['item'] . "</td>";
												echo "<td><button type=button>Print</button></td>";
												echo "</tr>";
											}

										?>

									</table>
                                </div>
                                <div id="tab6" class="tab_content">
                                    <div class="subpage_header">
                                        <span class="blue">Analytics</span>
                                        get yo' learn on
                                    </div>
                                    <hr/>
                                    <div class="span-17 feature_box">
                                        <h5>Analytics Overview</h5>
                                        <?php
										$host="db.seng.uvic.ca"; // Host name
										$username="se321g01"; // Mysql username
										$password="un8bi2YM"; // Mysql password
										$db_name="se321g01"; // Database name
										$tbl_name="user_stats"; // Table name

										// Connect to server and select databse.
										mysql_connect("$host", "$username", "$password")or die("cannot connect");
										mysql_select_db("$db_name")or die("cannot select DB");

										$uid = $_GET["uid"];
										$sql="SELECT * FROM $tbl_name WHERE uid='$uid'";
										$result=mysql_query($sql);
										$row = mysql_fetch_array($result);
										?>
                                        <p>
                                            <b>Points Earned Per Month</b>
                                        </p>
                                        <div id="chart1" style="width:100%;height:300px;">
                                            <script>
                                                dojo.require('dojox.charting.Chart2D');
                                                dojo.require('dojox.charting.widget.Chart2D');
                                                dojo.require('dojox.charting.themes.PlotKit.blue');

                                                /* JSON information */
                                                var json2 = {
                                                    Month: [123, 132, 32, 124, 56, 87, 53, 200, 43, 45, 78, 96, 45, 123, 145, 101, 110, 101, 67, 20]
                                                };

                                                /* build pie chart data */
                                                var chartData2 = [];
                                                dojo.forEach(json2['Month'], function(item, i){
                                                    chartData2.push({
                                                        x: i,
                                                        y: json2['Month'][i]
                                                    });
                                                });

                                                /* resources are ready... */
                                                dojo.ready(function(){

                                                    //create / swap data
                                                    var barData = [];
                                                    dojo.forEach(chartData2, function(item){
                                                        barData.push({
                                                            x: item['y'],
                                                            y: item['x']
                                                        });
                                                    });
                                                    var chart1 = new dojox.charting.Chart2D('chart1').setTheme(dojox.charting.themes.PlotKit.blue).addAxis('x', {
                                                        fixUpper: 'major',
                                                        includeZero: false,
                                                        min: 0,
                                                        max: 11
                                                    }).addAxis('y', {
                                                        vertical: true,
                                                        fixLower: 'major',
                                                        fixUpper: 'major'
                                                    }).addPlot('default', {
                                                        type: 'Columns',
                                                        gap: 5
                                                    }).addSeries('Visits For Each Month', chartData2, {});
                                                    var anim4b = new dojox.charting.action2d.Tooltip(chart1, 'default');
                                                    var anim4c = new dojox.charting.action2d.Shake(chart1, 'default');
                                                    chart1.render();

                                                });
                                            </script>
                                        </div>
                                        <hr/>
                                    </div>
                                </div>
                                <div id="tab7" class="tab_content">
                                    <div class="subpage_header">
                                        <span class="blue">Edit</span>
                                        we allow do-overs
                                    </div>
                                    <hr/>
                                    <div class="span-17 feature_box">
                                        <h5>Edit Your Profile</h5>
                                        <?php
										$host="db.seng.uvic.ca"; // Host name
										$username="se321g01"; // Mysql username
										$password="un8bi2YM"; // Mysql password
										$db_name="se321g01"; // Database name
										$tbl_name="user_info"; // Table name

										// Connect to server and select databse.
										mysql_connect("$host", "$username", "$password")or die("cannot connect");
										mysql_select_db("$db_name")or die("cannot select DB");

										$uid = $_GET["uid"];
										$sql="SELECT * FROM $tbl_name WHERE uid='$uid'";
										$result=mysql_query($sql);
										$row = mysql_fetch_array($result);
										?>
                                        <form id="edit_frm" name="edit_frm" action=<?php echo "./edit.php?uid=$uid"; ?> method="post">
                                            <div class="left">
                                                <img src="../images/login/icon_personal.gif" style="margin-top: 3px"/>&nbsp;&nbsp;&nbsp;
                                            </div>
                                            <div class="header_form left">
                                                Personal Profile
                                            </div>
                                            <div class="clear spacer">
                                            </div>
                                            <table name="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100px" class="gray_table left">
                                                <tr>
                                                    <td align="right" width="150" height="60" valign="middle">
                                                        <label>
                                                            First Name:
                                                        </label>
                                                    </td>
                                                    <td width="400" valign="middle">
                                                        <input class="text_box" type="text" name="txtFirstName" id="txtFirstName" value=<?php echo $row['first_name']; ?> />
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Last Name:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="txtLastName" id="txtLastName" value=<?php echo $row['last_name']; ?> />
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Email Address :
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="txtEmail" id="txtEmail" value=<?php echo $row['email']; ?> /><span class="input_caption">This will be your log in ID</span>
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Password:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input type="password" class="text_box" name="Password" id="Password" value=<?php echo $row['passwd']; ?> />
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Confirm Password:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input name="txtPassword2" type="password" class="text_box" id="txtPassword2" value=""  />
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                            <div class="clear">
                                            </div>
                                            <div class="spacer">
                                            </div>
                                            <div class="left">
                                                <img src="../images/login/icon_business.gif" style="margin-top: 3px"/>&nbsp;&nbsp;&nbsp;
                                            </div>
                                            <div class="header_form left">
                                                Shipping Information
                                            </div>
											<?php
											$sql="SELECT * FROM shipping_info WHERE uid='$uid'";
											$result=mysql_query($sql);
											$row = mysql_fetch_array($result);
											?>
                                            <div class="clear spacer">
                                            </div>
                                            <table name="tblCreateAcct" id="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100%" class="gray_table left">
                                                <tr>
                                                    <td align="right" width="150" height="60" valign="middle">
                                                        <label>
                                                            Country:
                                                        </label>
                                                    </td>
                                                    <td width="400" valign="middle">
                                                        <select name="country" class="text_box" id="country" style="">
                                                            <option value="CND" selected="selected">Canada</option>
                                                        </select>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Province:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <select name="province" id="province" style="">
                                                            <option value="">Select one...</option>
                                                            <option value="BC" selected="selected">BC</option>
                                                            <option value="AB">AB</option>
                                                            <option value="MB">MB</option>
                                                            <option value="NB">NB</option>
                                                            <option value="NL">NL</option>
                                                            <option value="NT">NT</option>
                                                            <option value="NS">NS</option>
                                                            <option value="NU">NU</option>
                                                            <option value="ON">ON</option>
                                                            <option value="PE">PE</option>
                                                            <option value="QC">QC</option>
                                                            <option value="SK">SK</option>
                                                            <option value="YT">YT</option>
                                                        </select>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            City:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="city" id="city" value=<?php echo $row['city']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Street Address:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="streetAddress" id="streetAddress" value=<?php echo $row['street_address']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Postal Code:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="postalCode" id="postalCode" value=<?php echo $row['postal_code']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Phone Number:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="phone" id="phone" value=<?php echo $row['phone']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                            <div class="clear">
                                            </div>
                                            <div class="spacer">
                                            </div>
                                            <div class="left">
                                                <img src="../images/login/icon_business.gif" style="margin-top: 3px"/>&nbsp;&nbsp;&nbsp;
                                            </div>
                                            <div class="header_form left">
                                                Billing Information
                                            </div>
											<?php
											$sql="SELECT * FROM billing_info WHERE uid='$uid'";
											$result=mysql_query($sql);
											$row = mysql_fetch_array($result);
											?>
                                            <div class="clear spacer">
                                            </div>
                                            <table name="tblCreateAcct" id="tblCreateAcct" cellspacing="0" cellpadding="10" border="0" width="100%" class="gray_table left">
                                                <tr>
                                                    <td height="60" align="right" valign="middle">
                                                        <label>
                                                        </label>
                                                        <label for="sameship">
                                                            Same as Shipping:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input type="checkbox" name="sameship" id="sameship" />
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="60" align="right" valign="middle">
                                                        <label>
                                                            Country:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <select name="country2" id="country2" style="">
                                                            <option value="CND" selected="selected">Canada</option>
                                                        </select>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Province:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <select name="province2" id="province2" style="">
                                                            <option value="">Select one...</option>
                                                            <option value="BC" selected="selected">BC</option>
                                                            <option value="AB">AB</option>
                                                            <option value="MB">MB</option>
                                                            <option value="NB">NB</option>
                                                            <option value="NL">NL</option>
                                                            <option value="NT">NT</option>
                                                            <option value="NS">NS</option>
                                                            <option value="NU">NU</option>
                                                            <option value="ON">ON</option>
                                                            <option value="PE">PE</option>
                                                            <option value="QC">QC</option>
                                                            <option value="SK">SK</option>
                                                            <option value="YT">YT</option>
                                                        </select>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            City:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="city2" id="city2" value=<?php echo $row['city']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Street Address:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="streetAddress2" id="streetAddress2" value=<?php echo $row['street_address']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Postal Code:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="postalCode2" id="postalCode2" value=<?php echo $row['postal_code']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Phone Number:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="phone2" id="phone2" value=<?php echo $row['phone']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" width="150" height="60" valign="middle">
                                                        <label>
                                                            Payment Method:
                                                        </label>
                                                    </td>
                                                    <td width="220" valign="middle">
                                                        <select name="credit" id="credit" style="">
                                                            <option value="credit" selected="selected">Credit Card</option>
                                                            <option value="paypal">Pay Pal</option>
                                                        </select>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Card Number:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <input class="text_box" type="text" name="cardnum" id="cardnum" value=<?php echo $row['card_number']; ?> />
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="middle">
                                                        <label>
                                                            Expiry Date:
                                                        </label>
                                                    </td>
                                                    <td valign="middle">
                                                        <select name="cardyear" class="ccselect" id="cardyear" style="">
                                                            <option value="year">Year</option>
                                                            <option value="11">11</option>
                                                            <option value="12">12</option>
                                                            <option value="13" selected="selected">13</option>
                                                            <option value="14">14</option>
                                                            <option value="15">15</option>
                                                            <option value="16">16</option>
                                                        </select>
                                                        <select name="cardmonth" class="ccselect" id="cardmonth" style="">
                                                            <option value="month" selected="selected">Month</option>
                                                            <option value="1">01</option>
                                                            <option value="2">02</option>
                                                            <option value="3">03</option>
                                                            <option value="4">04</option>
                                                            <option value="5">05</option>
                                                            <option value="6">06</option>
                                                            <option value="7">07</option>
                                                            <option value="8">08</option>
                                                            <option value="9" selected="selected">09</option>
                                                            <option value="10">10</option>
                                                            <option value="11">11</option>
                                                            <option value="12">12</option>
                                                        </select>
                                                        <div class="clear">
                                                        </div>
                                                    </td>
                                                    <td align="left" valign="middle">
                                                        <div class="td_spacer">
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
											<input  type="submit"/>
                                            <hr/>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clear spacer">
                </div>
                <div class="subpage_footer left">
                </div>
                <div class="spacer20 clear">
                </div>
                <div class="span-24 last blue_box2">
                    <div class="blue_box3">
                        Check out some of the great rewards being offered below!
                    </div>
                    <div class="who_tag">
                    </div>
                    <?php
					function getRandomFromArray($ar) {
						mt_srand( (double)microtime() * 1000000 );
						$num = array_rand($ar);
						return $ar[$num];
					}

					function getImagesFromDir($path) {
						$images = array();
						if ( $img_dir = @opendir($path) ) {
							while ( false !== ($img_file = readdir($img_dir)) ) {
								if ( preg_match("/(\.gif|\.jpg|\.png)$/", $img_file) ) {
									$images[] = $img_file;
								}
							}
							closedir($img_dir);
						}
						return $images;
					}

					$root = '';

					$path = '../admin/uploads/';

					$imgList = getImagesFromDir($root . $path);

					$img = getRandomFromArray($imgList);

					?> 
					<img src="<?php echo $path . $img ?>" class="margin_15" width="100%" />
                </div>
            </div>
        </div>
        <div class="spacer20 clear">
        </div>
        <div class="footer_landing">
            <div class="container">
                <div id="landing_footer_head_contact" class="span-8">
                    <div class="landing_footer_head">
                        Contact
                    </div>
                    Please call our support number at 1-800-555-5555 for any technical support questions.
                </div>
                <div class="span-8 last">
                    <div class="landing_footer_head">
                        Company
                    </div>
                    COWS is a product owned by WiFi Rewards, and was purchased from Steakhouse Communications.
                    <br/>
                    <br/>
                </div>
                <div style="border-top: 1px solid #1a1a1a; border-bottom: 1px solid #555555; margin: 0px 0 10px 0" class="clear">
                </div>
                <div class="left">
                    <div class="span-4">
                        &copy; 2011 Steakhouse Communications
                    </div>
                    <div class="span-8" id="footer_nav">
                        <ul>
                            <li>
                                <a href="../login.html">Login</a>
                            </li>
                            <li>
                                <a href="../registration.html">Registration</a>
                            </li>
                            <li>
                                <a href="">Legal</a>
                            </li>
                            <li>
                                <a href="">Links</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <script>
        $(document).ready(function(){
            $("ol ol").css("list-style", "lower-alpha");
            $("ol ol ol").css("list-style", "lower-roman");
            var currentSlide = 1;
            $(function(){
                var $page = document.location.href;
                $('#top_nav li a').each(function(){
                    var $href = $(this).attr('href');
                    if (($page.indexOf($href) != -1) || ($href == '')) {
                        $(this).addClass('active');
                    }
                    else {
                        $(this).removeClass('active');
                    }
                });
            });
            $(".tab_content").hide();
            $("ul.features_tabs li:eq("+<?php echo $_GET['tab']; ?>+")").addClass("active").show();
            $(".tab_content:eq("+<?php echo $_GET['tab']; ?>+")").show();
            $("ul.features_tabs li").click(function(){
                $("ul.features_tabs li").removeClass("active");
                $(this).addClass("active");
                $(".tab_content").hide();
                var activeTab = $(this).find("a").attr("href");
                $(activeTab).fadeIn();
                return false;
            });
        });
    </script>
</html>
